<?php
header('Content-type: text/vnd.wap.wml');
echo '<?xml version="1.0" encoding="utf-8"?>'."\n";
?>
<!DOCTYPE wml PUBLIC "-//PHONE.COM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card title="Kien's wap">
<?php
echo "<p>\n";
foreach (glob("../collection/*.mid") as $filename) {
    echo "<a href=\"$filename\">" . basename($filename) .  "</a> size " . filesize($filename) . "<br />\n";
}
echo "</p>";
/*if($dh = opendir("..")){
	while (($file = readdir($dh)) !== false) {
		echo "filename: $file : filetype: " . filetype($dir . $file) . "\n";
	}
}
*/
?>
<do type="options" label="Tai lai">
	<refresh />
</do>
</card>
</wml>

